package model

import (
	"gorm.io/gorm"
	"time"
)

type ChatHistories struct {
	Id         uint64         `gorm:"column:id;type:bigint UNSIGNED;primaryKey;not null;" json:"id"`
	CreatedAt  time.Time      `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt  time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt  gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
	FormUserId uint64         `gorm:"column:form_user_id;type:bigint UNSIGNED;comment:发信人id;not null;" json:"form_user_id"` // 发信人id
	ToUserId   int64          `gorm:"column:to_user_id;type:bigint;comment:收信人id;not null;" json:"to_user_id"`              // 收信人id
	RoomId     int64          `gorm:"column:room_id;type:bigint;comment:房间id;not null;" json:"room_id"`                     // 房间id
	Common     string         `gorm:"column:common;type:varchar(255);comment:聊天内容;not null;" json:"common"`                 // 聊天内容
}
